<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<s:head theme="ajax"  />
		<base href="<%=basePath%>">
		<title>My JSP 'showEmail.jsp' starting page</title>
		
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/email.css">
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/content.css">
		<script type="text/javascript" src="<%=basePath%>/js/common.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/email.js"></script>
		<script type="text/javascript"
			src="<%=basePath%>/xheditor/jquery/jquery-1.3.2.min.js"></script>
		<script type="text/javascript" src="<%=basePath%>/xheditor/xheditor.js"></script>

	</head>

	<body>
		<s:url id="inbox" value="email/inbox.action"></s:url>
		<s:url id="outbox" value="email/outbox.action"></s:url>
		<div id="email_Container">
			<div id="emailContainer">
				<div id="emailHead1">
					<span>---我的信箱</span>
				</div>
				<div id="emailHead2">
	
					<span class="emailHead2_1"><img src="<%=basePath%>/img/writenew.gif" /> </span>
					<a href="javascript:void(0)" onclick="openEdit()"> <span
						class="emailHead2_2">新建</span> </a>
				</div>
				<div id="emailBody">
					<div id="emailMenu">
						<ul>
							<li class="emailMenu1">
								<s:a href="%{inbox}" targets="email_content" theme="ajax"
									notifyTopics="showInfo">收件箱</s:a>
							</li>
							<li class="emailMenu2">
								<s:a href="%{outbox}" targets="email_content" theme="ajax">发件箱</s:a>
							</li>
						</ul>
					</div>
					<div id="emailContent">
						<div id="email_content">
							此邮箱学生只能发给课题老师，老师只能发给选自己课题的学生
						</div>
					</div>
				</div>
			</div>
		</div>
		<form name="editEmail" id="editEmail" method="post">
			<div id="newEmail" class="container" style="visibility: hidden;">
				<s:url id="send" action="email/sendEmail.action" />
				<div class="c_head">
					<span class="c_head_1">编辑信件</span>
					<span class="c_head_2"> <a href="javascript:void(0)"> <IMG
								src="<%=basePath%>/img/close2.gif" onclick="closeEdit()"> </a> </span>
				</div>
				<div id="edit_content">
					<div id="email_recipient">
						<span id="recipient_1">收件人:</span>
						<span id="recipient_2"> <s:if test='sign=="0"'>
								<s:select list="listUser" listKey="studentNum" listValue="name"
									name="toPeople"></s:select>
							</s:if> <s:else>
								<s:select list="listUser" listKey="teacherNum" listValue="name"
									name="toPeople"></s:select>
							</s:else> </span>
					</div>
					<div id="email_theme">
						<span id="theme_1">主 题:</span>
						<span id="theme_2"> <input type="text" name="theme"
								id="theme" /> </span>
					</div>
					<div id="email_editor">
						<textarea id="emailContent" name="emailContent"
							class="xheditor-simple" rows="15" style="width: 90%"></textarea>
					</div>
					<div id="email_button">
						<s:a href="%{send}" targets="email_result" theme="ajax"
							formId="editEmail" loadingText="发送中..." errorText="发送失败">发送</s:a>
					</div>
					<div id="email_result"></div>
				</div>
			</div>
		</form>


		<div id="showEmail" class="container" style="visibility: hidden;">
			<div class="c_head">
				<span class="c_head_1">查看信件</span>
				<span class="c_head_2"> <a href="javascript:void(0)"> <IMG
							src="<%=basePath%>/img/close2.gif" onclick="closeShowEmail()"> </a> </span>
			</div>
			<div id="showEmail_content">
				
			</div>
		</div>

		<div id="mask" style="display: none"></div>
	</body>
</html>
